class_name WeaponC_ExtensionMethod
extends WeaponC
## 子方法命名格式：ExtensionMethod_XXX
## 有新的需要在下面注册
var ex_method_dict:Dictionary = {
	Common = {
		object = null,
		method_names = {
			check_capacity = "check_capacity",
			set_anim_speed_scale = "set_anim_speed_scale",
		},
	},
	ShotBullet = {
		object = null,
		method_names = {
			shot_bullet = "shot_bullet",	
		},
	},
}

func init_component(weapon:Weapon):
	super.init_component(weapon)
	for child in get_children():
		if child is ExtensionMethod:
			ex_method_dict[child.name.split("_")[-1]].object = child
			child.init(self)
func equip():
	super.equip()
func unequip():
	super.unequip()
func discard():
	pass

func _init() -> void:
	weapon_component_name = "WeaponC_ExtensionMethod"
	priority = 50
